#ifdef a
#include<iostream>
using namespace std;
//定位new的覆盖问题
class Test {
public:
	Test()
		:_time(10)
	{}
private:
	int _time;
};
int main() {
	char* buffer = new char[500];
	Test* p1 = new(buffer) Test;
	cout << (void*)p1 << endl;
	Test* p2 = new(buffer) Test;
	cout << (void*)p2 << endl;
	//结果：两者地址相同，会产生覆盖
	Test* p3 = new(buffer + sizeof(Test)) Test;
	cout << (void*)p3 << endl;
	return 0;
}

#endif